package com.xiahui.day01;

/**
 * 逻辑运算符练习题综合案例
 */
public class TestLogicOperatorExercise {
    public static void main(String[] args) {
        int x = 8;
        int y = 9;
        System.out.println((++x == y) && (++x != y));//true
        System.out.println(x);//10

        int a = 8;
        int b = 9;
        System.out.println((a++ == b) && (++a != b));//false
        System.out.println(a);//9

        int c = 8;
        int d = 9;
        System.out.println((c++ == d) & (++c != d));//false
        System.out.println(c);//10

        System.out.println("----------------------------------------");

        int e = 8;
        int f = 9;
        System.out.println((++e == f) || (++e != f));//true
        System.out.println(e);//9

        int g = 8;
        int h = 9;
        System.out.println((++g == h) | (++g != h));//true
        System.out.println(g);//10

    }
}
